package com.kaishengit.pojo;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
@Entity
@Table(name="t_task")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Task {
	
	private int id;
	private String taskname;
	private String createtime;
	private String begintime;
	private String endtime;
	private String state;
	private String taskitems;
	
	private TaskItem taskitem;
	private Employee employee;
	private Set<TaskDiscuss> taskDiscussSet;
	private Product product;
	
	
	
	public String getTaskname() {
		return taskname;
	}
	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public void setTaskname(String taskname) {
		this.taskname = taskname;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	public String getBegintime() {
		return begintime;
	}
	public void setBegintime(String begintime) {
		this.begintime = begintime;
	}
	public String getEndtime() {
		return endtime;
	}
	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	@ManyToOne
	@JoinColumn(name="taskitemid")
	public TaskItem getTaskitem() {
		return taskitem;
	}
	public void setTaskitem(TaskItem taskitem) {
		this.taskitem = taskitem;
	}
	@ManyToOne
	@JoinColumn(name="employeeid")
	public Employee getEmployee() {
		return employee;
	}
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	@OneToMany(mappedBy="task")
	public Set<TaskDiscuss> getTaskDiscussSet() {
		return taskDiscussSet;
	}
	public void setTaskDiscussSet(Set<TaskDiscuss> taskDiscussSet) {
		this.taskDiscussSet = taskDiscussSet;
	}
	@ManyToOne
	@JoinColumn(name="productid")
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}
	public String getTaskitems() {
		return taskitems;
	}
	public void setTaskitems(String taskitems) {
		this.taskitems = taskitems;
	}
	
	
	
}
